package com.project.service.impl.backend.basic;

import java.util.List;
import com.project.dao.UserInfoDao;
import com.project.dao.bean.UserInfo;
import com.project.service.backend.basic.UserInfoService;

/**
 * 后台 用户管理 Service Impl
 * @author Sn
 *
 */
public class UserInfoServiceImpl implements UserInfoService 
{
	
	private UserInfoDao userInfoDao;

	@Override
	public void save(UserInfo userInfo) throws Exception 
	{
		userInfoDao.save(userInfo);
	}

	@Override
	public void update(UserInfo userInfo) throws Exception 
	{
		userInfoDao.update(userInfo);
	}

	@Override
	public void delete(UserInfo userInfo) throws Exception 
	{
		userInfoDao.delete(userInfo);
	}

	@Override
	public List<UserInfo> findUserBypg(UserInfo userInfo) throws Exception 
	{
		return userInfoDao.getUserInfo(userInfo);
	}

	@Override
	public UserInfo getUserById(UserInfo userInfo) throws Exception 
	{
		return userInfoDao.getUserById(userInfo);
	}
	
	@Override
	public boolean check(String loginName) throws Exception 
	{
		return userInfoDao.check(loginName);
	}
	
	public void setUserInfoDao(UserInfoDao userInfoDao) 
	{
		this.userInfoDao = userInfoDao;
	}
	
	public UserInfoDao getUserInfoDao() 
	{
		return userInfoDao;
	}

}
